package com.hangxintong.common.feign;

import com.hangxintong.common.base.entity.LmAssociation;
import com.hangxintong.common.config.FeignConfiguration;
import com.hangxintong.common.utils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Auther: tsj
 * @Date: 2020/12/11 15:23
 * @Description:
 */
@FeignClient(value = "coalition",configuration = FeignConfiguration.class)
public interface AssociationFegin {


    @GetMapping("/openFegin/member/findFirstByAssocCreditCode")
    LmAssociation findFirstByAssocCreditCode(@RequestParam(name = "companyCode") String companyCode);

    /**
     * 查询单个协会完整信息
     * @param assocId
     * @return
     * @author mxf 202-01-06
     */
    @GetMapping("/assoc/complete/{assocId}")
    Result findOneCompleteInfo(@PathVariable("assocId") Long assocId);

    /**
     * 查询协会列表
     * @param assocId
     * @return Mr.Bz
     */
    @PostMapping("/openFegin/member/listAssociation")
    List<LmAssociation> listAssociation(@RequestParam("assocId") List<Long> assocId);
}
